import tushare as ts
import pandas as pd


def get_data(code,start='2019-10-15',end='2020-11-09'):
    df=ts.get_k_data(code,autype='qfq',start=start,end=end)
    print(df)
    df.index=pd.to_datetime(df.date)
    df['openinterest']=0
    df=df[['open','high','low','close','volume','openinterest']]
    return df

df = get_data(code='DJI')
print(df)
